Skip to content

fix: bundle daemon sidecars in app build#506

Open
vforsh wants to merge 5 commits intoDimillian:mainfrom
vforsh:fix/bundle-daemon-sidecars
Open

fix: bundle daemon sidecars in app build#506
vforsh wants to merge 5 commits intoDimillian:mainfrom
vforsh:fix/bundle-daemon-sidecars

Conversation

@vforsh
Copy link
Contributor

@vforsh vforsh commented Feb 24, 2026

Summary

  • bundle codex_monitor_daemon and codex_monitor_daemonctl via bundle.externalBin
  • add scripts/build-tauri-sidecars.sh to build and stage sidecar binaries before Tauri bundling
  • wire sidecar preparation into beforeBuildCommand
  • document behavior in README and ignore generated src-tauri/binaries/

Notes

  • this fixes app bundles missing the daemon binary required by codex_monitor_daemonctl

@vforsh
Copy link
Contributor Author

vforsh commented Feb 24, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad44bf9cd2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

package.json Outdated
"prebuild": "npm run sync:material-icons",
"build": "tsc && vite build",
"build:appimage": "NO_STRIP=1 tauri build --bundles appimage",
"build:tauri-sidecars": "sh scripts/build-tauri-sidecars.sh",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Run sidecar build script with bash

The new build:tauri-sidecars script invokes sh scripts/build-tauri-sidecars.sh, but build-tauri-sidecars.sh is written for Bash (set -euo pipefail, arrays, [[ ... ]], BASH_SOURCE). On systems where /bin/sh is not Bash (e.g. Ubuntu dash), this command fails immediately (set: Illegal option -o pipefail), so the sidecar build entrypoint added in this commit is unusable and cannot prepare binaries when called directly.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e27036e. I replaced the shell-only sidecar step with a cross-platform Node script (scripts/build-tauri-sidecars.mjs) and updated both build:tauri-sidecars and beforeBuildCommand to use it, so this no longer depends on Bash or ./...sh on Windows.

@vforsh vforsh marked this pull request as draft February 24, 2026 13:16
@vforsh
Copy link
Contributor Author

vforsh commented Feb 25, 2026

Docs update pushed in d66dc60:

  • Updated the Headless Daemon Management section to use binaries from the installed app bundle.
  • Moved macOS launchd autostart setup into a dedicated doc: docs/macos-launchd-daemon.md.
  • Added README reference to that new doc.

@vforsh vforsh marked this pull request as ready for review February 25, 2026 05:59
@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d66dc603be

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Dimillian
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7983ecea63

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


const cargoArgs = ["build", "--release"];
if (explicitTarget) {
cargoArgs.push("--target", buildTarget);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle universal target before passing --target to cargo

tauri build --help allows universal-apple-darwin, but this hook forwards TAURI_ENV_TARGET_TRIPLE directly to cargo build --target. When the build target is universal, Cargo rejects it (could not find specification for target "universal-apple-darwin"), so beforeBuildCommand fails before Tauri can do its universal macOS build flow. This makes supported universal macOS builds fail whenever sidecar prep runs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants